﻿using System;

namespace Ausm.ObjectStore.Example.Entities
{
    [Table("dbo.Address")]
    public abstract class Address
    {
        [Mapping(FieldName="Id"), IsPrimaryKey]
        public abstract int Id { get; }

        [Mapping(FieldName = "Street")]
        public abstract string Street { get; set; }

        [Mapping(FieldName = "ZipCode")]
        public abstract int ZipCode { get; set; }

        [Mapping(FieldName = "City")]
        public abstract string City { get; set; }

        [ForeignObjectMapping("Person")]
        public abstract Person Person { get; set; }
    }
}
